package com.object.module.lq.sys.controller;

import com.object.utils.Q;
import com.object.utils.SpringBootFlushed;
import com.object.utils.SysUtile;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sys")
public class TSysController
{


    /**
     * 系统信息查询
     *
     * @return
     */
    @GetMapping
    public Q sysAll()
    {
        return Q.ok().put("jvm", SysUtile.printSummary());
    }

    /**
     * 后台项目重启
     *
     * @return
     */
    @GetMapping("flushed")
    public Q flushed()
    {
        return SpringBootFlushed.flushed();
    }
}
